<template>
    <div class="wrapper">
        <StaticPart />
        <NearBy :goodslist="goodslist" @touch="hander" />
    </div>
    <Docker />
</template>

<script setup>
import { get } from "../../utils/request.js"
import StaticPart from './components/StaticPart.vue';
import NearBy from './components/NearBy.vue';
import Docker from '../../components/Docker.vue';
import { ref } from "vue"
let goodslist = ref([])
let page = 1

localStorage.setItem("isLogin", "true");


//请求数据
async function getgoodsdata () {
    let res = await get(`/goods?project_id=238&page=${page}&limit=5`)
    console.log(res);
    goodslist.value = goodslist.value.concat(res.result.rows)
    // console.log(goodslist.value);
}
getgoodsdata()



const hander = () => {
    page++
    getgoodsdata()

}
</script>

<style lang="scss" scoped>
.wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: .5rem;

}
</style>